package com.learning.JavaSE.module1.task4;
/*
  使用do while循环来模拟学习效果的检查
 */

import java.util.Scanner;

public class DoWhileCheckTest {
    public static void main(String[] args) throws Exception {
        String msg = null;
        do {
            System.out.println("正在疯狂学习中...");
            Thread.sleep(5000);//5000毫秒模拟5秒学习过程
            System.out.println("是否合格？(Y/N)");
            Scanner sc = new Scanner(System.in);
            msg = sc.next();
        } while (!"Y".equals(msg));
        System.out.println("恭喜任务合格！");
        System.out.println("----------------------");
        int i = 1;
        while (i<=1000){
            ;//空语句用于延时
            i++;
        }
        {
            System.out.println("??");

        }

    }

}
